Skip to content

Adjust code to build with ReferenceCell being a template <dim>.#6904

Open
bangerth wants to merge 1 commit intogeodynamics:mainfrom
bangerth:reference-cell
Open

Adjust code to build with ReferenceCell being a template <dim>.#6904
bangerth wants to merge 1 commit intogeodynamics:mainfrom
bangerth:reference-cell

Conversation

@bangerth
Copy link
Contributor

Do not merge yet!

This is the ASPECT companion to dealii/dealii#19390 which changes ReferenceCell to be a template <dim>. There are really only two issues one has to address:

  • ReferenceCell itself now has a template argument. We use that class in a whole bunch of places and after starting out with lots of #if DEAL_II_VERSION_GTE(...) changes, I threw that all away and instead created aspect::ReferenceCell<dim> for older deal.II versions that for every value of dim simply refers to dealii::ReferenceCell. Then one can change all occurrences in our code base to ReferenceCell<dim>, which correctly resolves to either the templated or non-templated version.
  • The old ReferenceCell class did not know about the dimension it lives in, and so many member functions were themselves templates of the space dimension. One typically had to provide this template argument by hand, as in reference_cell.get_gauss_type_quadrature<dim>(degree). This is now no longer necessary, but there is no convenient way to find a common way to describe this and I needed to have #if statements. We only have two functions where that matters, but both have half a dozen statements that needed to be converted, so I introduced lambda functions in each of these two places so I only needed one #if conditional each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant